import request from '@/utils/request'
//新增角色
export const addRoles =data =>request.post('/sys/role',data)
//获取所有的角色详情
export const getRoles =params =>request.get('/sys/role',{params})
//根据id修改角色详情
export const updateRoles =data=>request.put(`/sys/role/${data.id}`,data)
//根据id删除角色
export const delRoles =id=>request.delete(`/sys/role/${id}`)
//获取一个角色的详情
export const getRolesDetail =id=>request.get(`/sys/role/${id}`)
//给角色分配权限
export const assignPermission =data=>request.put('/sys/role/assignPrem',data)
